package com.api.syh56.shengyunhui;

import com.gitee.sunchenbin.mybatis.actable.manager.handler.StartUpHandler;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
@MapperScan("com.api.syh56.shengyunhui.mapper")
@EnableTransactionManagement //开启事务管理
@EnableScheduling //开启任务调度

@EnableAsync //开启异步任务

//actable注解
//@MapperScan("com.gitee.sunchenbin.mybatis.actable.dao.*")
//@ComponentScan(basePackages = {"com.gitee.sunchenbin.mybatis.actable.manager.*"})

public class ShengYunHuiApplication {

	public static void main(String[] args) {
		ConfigurableApplicationContext run = SpringApplication.run(ShengYunHuiApplication.class, args);


		// 容器中获取actable的核心处理类
		// 手动执行actable的建表方法
//		StartUpHandler bean = run.getBean(StartUpHandler.class, args);
//		bean.startHandler();
	}
}